# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pdfrw
_pkgname=pdfrw
pkgver=0.4
pkgrel=7
pkgdesc='PDF file reader/writer library.'
url='https://pypi.org/project/pdfrw/#files'
arch=('any')
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('6c0b629e837f9bd479a288bcd040952b98920da345113bf90167becbdf2f90a9d6c082c5e7988c68118bd62a2a5a0d22f98523407996531bb5d3031e847e10b0')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

